package com.newly.center.business.service;


import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;
import com.newly.common.base.entity.R;
import com.newly.common.base.entity.business.Vo.MqttDeviceVo;
import com.newly.common.base.entity.device.po.DevicePo;

import java.util.List;
import java.util.Map;

public interface MQTTDeviceService extends IService<DevicePo> {
    R getDeviceFlvUrl(String id, String type);

    List<String> getDateOfExistenceOfMedia(String siteId, String startDate, String endDate);

    List<Map<String, String>> getDeviceHistoryFlvUrl(String date, String siteId);

    JSONArray getLivingGateway();

    R search(MqttDeviceVo data);

    R add(MqttDeviceVo data);

    R delete(List<String> ids);

    R deleteCamera(MqttDeviceVo data, int slot, int[] channelIndex);

    R modify(MqttDeviceVo data);

    R modifyGateway(MqttDeviceVo data);

    R deleteGateway(List<String> ids);

    R modifyVideoId(MqttDeviceVo data);

    R getList(MqttDeviceVo data, int[] slot);

    R deviceSync(MqttDeviceVo data);

    R getDeviceList(String keyword, Integer deviceStatus, Long siteId, Integer type, Integer pageNum, Integer pageSize);

    R getDeviceTree(String keyword);

    /**
     * 根据站点id获取车牌识别摄像机直播url
     *
     * @param siteId
     * @return
     */
    List<String> getUrlBySiteId(String siteId);

    /**
     * 通过id获取当前租户拥有的设备
     *
     * @param deviceIds 设备id
     * @return List DevicePo.class
     */
    List<DevicePo> getByIdsInAuth(List<String> deviceIds);
}
